/**
 * Auto gen via dbpojo-gen.
 */
package com.us.usws.service.cud.impl;

import org.apache.commons.lang3.StringUtils;

import com.us.usws.dao.MeetingDAO;
import com.us.usws.model.flat.DOMeeting;
import com.us.usws.service.cud.MeetingCUDService;

/**
 * Service RO impl class
 * @author robot
 */
public class MeetingCUDServiceImpl implements MeetingCUDService {

	/**
	 * DAO instance
	 */
	private MeetingDAO dao = new MeetingDAO();

	/**
	 * Insert one row.
	 */
	@Override
	public String addMeeting(DOMeeting meeting) {
		return dao.insertMeeting(meeting);
	}

	/**
	 * Update by PK.
	 */
	@Override
	public void updateMeeting(DOMeeting meeting) {
		dao.updateMeeting(meeting);
	}

	/**
	 * Delete row by PK.
	 */
	@Override
	public void deleteMeeting(String uid) {
		dao.deleteMeeting(uid);
	}

	@Override
	public void deleteMeetingMore(String uids) {
		if (StringUtils.isNotBlank(uids)) {
			String[] uid = StringUtils.split(uids, ",");
			for (String id : uid) {
				deleteMeeting(id);
			}
		}
	}

}